<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
	pageEncoding="ISO-8859-1"%>
<%@ page import="java.util.*"%>
<%@ page import="entities.*"%>

<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link href="style/style.css" rel="stylesheet" type="text/css">
<title>Insert title here</title>
</head>
<body>
	
	<table id="liste">
	<tr>
	<th>Id</th>
	<th>Prenom</th>
	<th>Nom</th>
	<th>Groupe</th>
	<th>Nb Abs</th>
	<th colspan="2">Actions</th>
	
	</tr>
	
	<%!
	private int i = 0;
	
	private List<Etudiant> listEtu = GestionFactory.getEtudiants();

	private int nombreVisites;
	private String nom;
	private String prenom;
	private String groupe;
	private int nbAbs;
	private int id;
	private String nomJoueur = null;
	private String style;
	%>

	<%
		for (i = 0; i < listEtu.size(); i++) {

			id = listEtu.get(i).getId();
			prenom = listEtu.get(i).getPrenom();
			nom = listEtu.get(i).getNom();
			groupe = listEtu.get(i).getGroupe();
			nbAbs = listEtu.get(i).getNbAbsences();
			
			
			if (i%2 == 0) {
				style = "pair";				
			}
			else{ 
				style = "impair";
			}
		
	%>
	<tr class="<%=style%>">
	<td><%=id%></td>
	<td><%=prenom%></td>
	<td><%=nom%></td>
	<td><%=groupe%></td>
	<td><%=nbAbs%></td>
	<td><a href='#'>Voir</a></td>
	<td><a href='#'>Editer</a></td>
	</tr>
	
	
	<% } %>
	</table>
</body>
</html>